﻿namespace FlexPlatform.Visual.Presenters
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;

    using FlexPlatform.BusinessLogic.Controllers;
    using FlexPlatform.BusinessLogic.Validation;
    using FlexPlatform.GeneralUse;
    using FlexPlatform.Shared.DataModel;
    using FlexPlatform.Shared.Presenters;
    using FlexPlatform.Shared.Validation;

    public class SimplePresenter : NotifyPropertyChangedBase<SimplePresenter>, IPresenter
    {
        #region Constructor & Private fields
        
        protected string clsName;
        private ISectionPresenter clsSectionPresenter;
        
        public SimplePresenter()
        {

        }

        #endregion

        public string Name
        {
            get
            {
                return clsName;
            }
        }

        public IEnumerable<IValidationResult> ValidationResults  { get; set; }
  
        public IEnumerable<object> ProposedValues { get; set; }

        public bool IsBusy 
        {
            get
            {
                return true;
            }
        }

        ////[ThreadStatic]
        ////private bool clsSectionUpdateStarted;
        ////public ISectionPresenter Section
        ////{
        ////    get
        ////    {
        ////        return clsSectionPresenter;
        ////    }
        ////    set
        ////    {
        ////        // don't do anything if another section update process have been started from some other entry point
        ////        if (!clsSectionUpdateStarted)
        ////        {
        ////            clsSectionUpdateStarted = true;
        ////            if (clsSectionPresenter != value)
        ////            {
        ////                clsSectionPresenter = value;
        ////                clsSectionPresenter.RegisterDataEntity(this.clsEntityController.DataEntity);
        ////            }
        ////            clsSectionUpdateStarted = false;
        ////        }
        ////    }
        ////}

        
    }
}
